import App from './App'
// vuex
import store from '@/store/index.js'
// uviewPlus导入
import uviewPlus from '@/uni_modules/uview-plus'
import bootstrap from './core/bootstrap'

// 全局 mixin
import share from './core/mixins/share.js'
import mixin from './core/mixins/app'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'

export function createApp() {
	const app = createSSRApp(App)
	// 注册组件库和vuex
	app.use(uviewPlus).use(store)
	app.config.productionTip = false
	//全局mixin
	app.mixin(mixin).mixin(share)
	return {
		app,
		created: bootstrap
	}
}
// #endif